/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
}

/* 自定义标题栏样式 */
.custom-titlebar {
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    -webkit-app-region: drag;
    user-select: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.titlebar-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.titlebar-title {
    display: flex;
    align-items: center;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.titlebar-title i {
    font-size: 16px;
    margin-right: 8px;
}

.title-text {
    margin-right: 10px;
}

.subtitle-text {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 400;
}

.titlebar-controls {
    display: flex;
    -webkit-app-region: no-drag;
}

.titlebar-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.titlebar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.titlebar-btn.close-btn:hover {
    background: #e74c3c;
}

.titlebar-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.titlebar-btn.close-btn:active {
    background: #c0392b;
}

/* 容器样式 */
.container-fluid {
    margin: 0 auto;
}

/* 头部样式和动画 */
.header {
    color: white;
    position: relative;
}



/* 主内容区域 */
.main-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    animation: slideInUp 0.8s ease-out;
    padding: 1.5rem;
    margin-top: 40px;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* 自定义按钮样式 */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: #3b82f6;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-color: #2563eb;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* 融合的拖拽区域 */
.unified-drop-zone {
    border-color: #cbd5e1 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unified-drop-zone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
    pointer-events: none;
}

.unified-drop-zone:hover::before {
    transform: translateX(100%);
}

.unified-drop-zone.drag-over {
    border-color: #3b82f6 !important;
    background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.1);
}

.unified-drop-zone.drag-over .drop-zone-content {
    transform: scale(1.02);
}

.drop-zone-content {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    width: 100%;
}

.drop-zone-content .btn {
    pointer-events: auto;
    position: relative;
    z-index: 2;
}

.unified-drop-zone i.display-1 {
    transition: all 0.3s ease;
}

.unified-drop-zone.drag-over i.display-1 {
    transform: scale(1.1) rotate(5deg);
    color: #3b82f6;
}

/* 拖拽区域内的按钮样式优化 */
.unified-drop-zone .btn {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.unified-drop-zone .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* 卡片样式 */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

.card-body {
    padding: 1rem;
}

.card-body .mb-3:last-child {
    margin-bottom: 0 !important;
}

/* 裁剪功能样式 */
.crop-ratio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.crop-ratio-btn {
    position: relative;
    padding: 0.75rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.crop-ratio-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.crop-ratio-btn input[type="radio"] {
    display: none;
}

.crop-ratio-btn input[type="radio"]:checked + .crop-ratio-content {
    color: #3b82f6;
}

.crop-ratio-btn input[type="radio"]:checked {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
}

.crop-ratio-btn:has(input[type="radio"]:checked) {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #3b82f6;
}

.crop-position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}

.crop-position-btn {
    position: relative;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
}

.crop-position-btn:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.crop-position-btn input[type="radio"] {
    display: none;
}

.crop-position-btn:has(input[type="radio"]:checked) {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #3b82f6;
}

.custom-crop-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.custom-crop-inputs .form-group {
    margin-bottom: 0;
}

.custom-crop-inputs .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.custom-crop-inputs .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* 文件数量显示区域 */
.file-count-display {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.file-count-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.file-count-display:hover::before {
    transform: translateX(100%);
}

.file-count-display:hover {
    border-color: #3b82f6 !important;
    background: linear-gradient(135deg, #eff6ff, #dbeafe) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.12);
}

.file-count-display:active {
    transform: translateY(0);
}

.file-count-content {
    position: relative;
    z-index: 1;
}

.file-count-display i {
    transition: all 0.3s ease;
}

.file-count-display:hover i {
    transform: scale(1.05);
    color: #2563eb;
}

.file-count-display .badge {
    transition: all 0.3s ease;
    animation: none;
}

.file-count-display:hover .badge {
    transform: scale(1.02);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

/* 文件列表 */
.file-list {
    background: #f8fafc;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}

.file-item:hover {
    background: #e9ecef;
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.file-icon {
    font-size: 1.5rem;
}

.file-details h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #2c3e50;
}

.file-details p {
    margin: 0;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.remove-file {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.remove-file:hover {
    background: #c0392b;
}

/* 表单控件样式 */
.form-control:focus,
.form-select:focus,
.form-range:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-range::-webkit-slider-thumb {
    background: #3b82f6;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-range::-moz-range-thumb {
    background: #3b82f6;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 单选框样式优化 */
.form-check {
    padding: 0.5rem 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    background: #fff;
    margin-bottom: 0.25rem;
    position: relative;
    cursor: pointer;
}

.form-check .form-check-input {
    margin-left: 0;
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    z-index: 1;
}

.form-check .form-check-input + .form-check-label::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    background: #fff;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.form-check .form-check-input[type="radio"] + .form-check-label::before {
    border-radius: 50%;
}

.form-check:hover {
    border-color: #3b82f6;
    background: #f8f9ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.12);
}

.form-check-input {
    margin-top: 0;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.form-check-input:checked+.form-check-label {
    color: #3b82f6;
    font-weight: 500;
}

.form-check-input:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-check-input:checked + .form-check-label::before {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.form-check-input[type="radio"]:checked + .form-check-label::before {
    background-color: #3b82f6;
    border-color: #3b82f6;
    box-shadow: inset 0 0 0 3px #fff;
}

.form-check-input[type="checkbox"]:checked + .form-check-label::before {
    background-color: #3b82f6;
    border-color: #3b82f6;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
    background-size: 0.75rem;
    background-position: center;
    background-repeat: no-repeat;
}

.form-check-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.2);
}

.form-check-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    transition: color 0.2s ease;
    margin-bottom: 0;
    line-height: 1.2;
}

.form-check-label i {
    color: #6c757d;
    transition: color 0.2s ease;
    font-size: 0.875rem;
}

.form-check-input:checked+.form-check-label i {
    color: #3b82f6;
}

/* 徽章样式 */
.badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* 输入组样式 */
.input-group .btn {
    border-left: none;
}

.input-group .form-control:focus+.btn {
    border-color: #3b82f6;
}

/* 进度条动画 */
.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position-x: 1rem;
    }
}

/* 页面加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}





/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}



#fileCount{
    color:#2563eb
}

/* 模态框层级修复 */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

/* 确保文件列表模态框正确显示 */
#fileListModal .modal-dialog {
    z-index: 1055;
}

#fileListModal .modal-content {
    position: relative;
    z-index: 1;
}